import request from '@/utils/request';



/**
 * 返回每天订单条数
 */
export async function listDayNum(params) {
  const res = await request.get('/order/dashBoard/listDayNum', { params });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

/**
 * 返回每月订单条数
 */
export async function listMonthNum(params) {
  const res = await request.get('/order/dashBoard/listMonthNum', { params });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

/**
 * 本周本月热门门点
 */
export async function listDockNum(params) {
  const res = await request.get('/order/dashBoard/listDockNum', { params });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
/**
 * 返回每月订单客户或者司机条数
 */
export async function listCustomerAndDriverNum(params) {
  const res = await request.get('/order/dashBoard/listCustomerAndDriverNum', { params });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

/**
 * 日历返回订单数量
 */
export async function calendarBillNum(params) {
  const res = await request.get('/order/dashBoard/calendarBillNum', { params });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}








